package projectsupporter.common.logic;

import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.plugin.AbstractUIPlugin;

public class PlugUILogic {

	public final class ImagePath
	{
		public final static String EMPTY_PACK_OBJ = "icons/eclipse-icons/empty_pack_obj.gif";
		public final static String FLDR_OBJ = "icons/eclipse-icons/fldr_obj.gif";
		public final static String PACKAGE_OBJ = "icons/eclipse-icons/package_obj.gif";
		public final static String PACKAGEFOLDER_OBJ = "icons/eclipse-icons/packagefolder_obj.gif";
		public final static String PRJ_OBJ = "icons/eclipse-icons/prj_obj.gif";
		public final static String PROP_PS = "icons/eclipse-icons/prop_ps.gif";
		public final static String OVERVIEW_OBJ = "icons/eclipse-icons/overview_obj.gif";
		public final static String TOPIC_SMALL = "icons/eclipse-icons/topic_small.gif";
		
		public final static String CONVJPPRJ_WIZ = "icons/eclipse-icons/convjpprj_wiz(2).gif";
		public final static String EXP_PRODUCT = "icons/eclipse-icons/exp_product(2).gif";
		
		
	}
	
	public static Image getImage(Display display, String path)
	{
		if(GlobalInfo.workspaceON)
		{
			return AbstractUIPlugin.imageDescriptorFromPlugin( GlobalInfo.PLUGIN_ID, path).createImage();
		}
		else
		{
			return new Image(display,path);
		}
		
	}
	
}
